import 'package:cbec_app/generated/json/base/json_convert_content.dart';
import 'package:cbec_app/entity/home/content/scroll_image_slider_entity.dart';
import 'package:cbec_app/entity/home/content/content_data.dart';

ScrollImageSliderEntity $ScrollImageSliderEntityFromJson(Map<String, dynamic> json) {
  final ScrollImageSliderEntity scrollImageSliderEntity = ScrollImageSliderEntity();
  final String? indicator = jsonConvert.convert<String>(json['indicator']);
  if (indicator != null) {
    scrollImageSliderEntity.indicator = indicator;
  }
  final int? pageMarginTop = jsonConvert.convert<int>(json['page_margin_top']);
  if (pageMarginTop != null) {
    scrollImageSliderEntity.pageMarginTop = pageMarginTop;
  }
  final bool? showOriginPrice = jsonConvert.convert<bool>(json['show_origin_price']);
  if (showOriginPrice != null) {
    scrollImageSliderEntity.showOriginPrice = showOriginPrice;
  }
  final String? imageFillStyle = jsonConvert.convert<String>(json['image_fill_style']);
  if (imageFillStyle != null) {
    scrollImageSliderEntity.imageFillStyle = imageFillStyle;
  }
  final String? maskColor = jsonConvert.convert<String>(json['mask_color']);
  if (maskColor != null) {
    scrollImageSliderEntity.maskColor = maskColor;
  }
  final List<ScrollImageSliderGoods>? goods = (json['goods'] as List<dynamic>?)?.map((e) => jsonConvert.convert<ScrollImageSliderGoods>(e) as ScrollImageSliderGoods).toList();
  if (goods != null) {
    scrollImageSliderEntity.goods = goods;
  }
  final String? cornerMarkType = jsonConvert.convert<String>(json['corner_mark_type']);
  if (cornerMarkType != null) {
    scrollImageSliderEntity.cornerMarkType = cornerMarkType;
  }
  final String? textAlignType = jsonConvert.convert<String>(json['text_align_type']);
  if (textAlignType != null) {
    scrollImageSliderEntity.textAlignType = textAlignType;
  }
  final String? showCornerMark = jsonConvert.convert<String>(json['show_corner_mark']);
  if (showCornerMark != null) {
    scrollImageSliderEntity.showCornerMark = showCornerMark;
  }
  final String? uuid = jsonConvert.convert<String>(json['uuid']);
  if (uuid != null) {
    scrollImageSliderEntity.uuid = uuid;
  }
  final String? textStyleType = jsonConvert.convert<String>(json['text_style_type']);
  if (textStyleType != null) {
    scrollImageSliderEntity.textStyleType = textStyleType;
  }
  final bool? price = jsonConvert.convert<bool>(json['price']);
  if (price != null) {
    scrollImageSliderEntity.price = price;
  }
  final int? pageMarginRight = jsonConvert.convert<int>(json['page_margin_right']);
  if (pageMarginRight != null) {
    scrollImageSliderEntity.pageMarginRight = pageMarginRight;
  }
  final String? buyBtnType = jsonConvert.convert<String>(json['buy_btn_type']);
  if (buyBtnType != null) {
    scrollImageSliderEntity.buyBtnType = buyBtnType;
  }
  final List<ScrollImageSliderSubEntry>? subEntry = (json['sub_entry'] as List<dynamic>?)?.map((e) => jsonConvert.convert<ScrollImageSliderSubEntry>(e) as ScrollImageSliderSubEntry).toList();
  if (subEntry != null) {
    scrollImageSliderEntity.subEntry = subEntry;
  }
  final String? imageStyle = jsonConvert.convert<String>(json['image_style']);
  if (imageStyle != null) {
    scrollImageSliderEntity.imageStyle = imageStyle;
  }
  final int? swipeTime = jsonConvert.convert<int>(json['swipe_time']);
  if (swipeTime != null) {
    scrollImageSliderEntity.swipeTime = swipeTime;
  }
  final bool? bottomrds = jsonConvert.convert<bool>(json['bottomrds']);
  if (bottomrds != null) {
    scrollImageSliderEntity.bottomrds = bottomrds;
  }
  final int? pageMarginBottom = jsonConvert.convert<int>(json['page_margin_bottom']);
  if (pageMarginBottom != null) {
    scrollImageSliderEntity.pageMarginBottom = pageMarginBottom;
  }
  final String? soldColor = jsonConvert.convert<String>(json['sold_color']);
  if (soldColor != null) {
    scrollImageSliderEntity.soldColor = soldColor;
  }
  final String? sizeType = jsonConvert.convert<String>(json['size_type']);
  if (sizeType != null) {
    scrollImageSliderEntity.sizeType = sizeType;
  }
  final String? titleColor = jsonConvert.convert<String>(json['title_color']);
  if (titleColor != null) {
    scrollImageSliderEntity.titleColor = titleColor;
  }
  final String? priceColor = jsonConvert.convert<String>(json['price_color']);
  if (priceColor != null) {
    scrollImageSliderEntity.priceColor = priceColor;
  }
  final String? borderRadiusType = jsonConvert.convert<String>(json['border_radius_type']);
  if (borderRadiusType != null) {
    scrollImageSliderEntity.borderRadiusType = borderRadiusType;
  }
  final int? pageMarginLeft = jsonConvert.convert<int>(json['page_margin_left']);
  if (pageMarginLeft != null) {
    scrollImageSliderEntity.pageMarginLeft = pageMarginLeft;
  }
  final String? oldpriceColor = jsonConvert.convert<String>(json['oldprice_color']);
  if (oldpriceColor != null) {
    scrollImageSliderEntity.oldpriceColor = oldpriceColor;
  }
  final int? bdr = jsonConvert.convert<int>(json['bdr']);
  if (bdr != null) {
    scrollImageSliderEntity.bdr = bdr;
  }
  final String? bgColor = jsonConvert.convert<String>(json['bg_color']);
  if (bgColor != null) {
    scrollImageSliderEntity.bgColor = bgColor;
  }
  final bool? showTitle = jsonConvert.convert<bool>(json['show_title']);
  if (showTitle != null) {
    scrollImageSliderEntity.showTitle = showTitle;
  }
  final String? cornerType = jsonConvert.convert<String>(json['corner_type']);
  if (cornerType != null) {
    scrollImageSliderEntity.cornerType = cornerType;
  }
  final String? cornerMarkImage = jsonConvert.convert<String>(json['corner_mark_image']);
  if (cornerMarkImage != null) {
    scrollImageSliderEntity.cornerMarkImage = cornerMarkImage;
  }
  final String? buttonText = jsonConvert.convert<String>(json['button_text']);
  if (buttonText != null) {
    scrollImageSliderEntity.buttonText = buttonText;
  }
  return scrollImageSliderEntity;
}

Map<String, dynamic> $ScrollImageSliderEntityToJson(ScrollImageSliderEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['indicator'] = entity.indicator;
  data['page_margin_top'] = entity.pageMarginTop;
  data['show_origin_price'] = entity.showOriginPrice;
  data['image_fill_style'] = entity.imageFillStyle;
  data['mask_color'] = entity.maskColor;
  data['goods'] = entity.goods?.map((v) => v.toJson()).toList();
  data['corner_mark_type'] = entity.cornerMarkType;
  data['text_align_type'] = entity.textAlignType;
  data['show_corner_mark'] = entity.showCornerMark;
  data['uuid'] = entity.uuid;
  data['text_style_type'] = entity.textStyleType;
  data['price'] = entity.price;
  data['page_margin_right'] = entity.pageMarginRight;
  data['buy_btn_type'] = entity.buyBtnType;
  data['sub_entry'] = entity.subEntry?.map((v) => v.toJson()).toList();
  data['image_style'] = entity.imageStyle;
  data['swipe_time'] = entity.swipeTime;
  data['bottomrds'] = entity.bottomrds;
  data['page_margin_bottom'] = entity.pageMarginBottom;
  data['sold_color'] = entity.soldColor;
  data['size_type'] = entity.sizeType;
  data['title_color'] = entity.titleColor;
  data['price_color'] = entity.priceColor;
  data['border_radius_type'] = entity.borderRadiusType;
  data['page_margin_left'] = entity.pageMarginLeft;
  data['oldprice_color'] = entity.oldpriceColor;
  data['bdr'] = entity.bdr;
  data['bg_color'] = entity.bgColor;
  data['show_title'] = entity.showTitle;
  data['corner_type'] = entity.cornerType;
  data['corner_mark_image'] = entity.cornerMarkImage;
  data['button_text'] = entity.buttonText;
  return data;
}

extension ScrollImageSliderEntityExtension on ScrollImageSliderEntity {
  ScrollImageSliderEntity copyWith({
    String? indicator,
    int? pageMarginTop,
    bool? showOriginPrice,
    String? imageFillStyle,
    String? maskColor,
    List<ScrollImageSliderGoods>? goods,
    String? cornerMarkType,
    String? textAlignType,
    String? showCornerMark,
    String? uuid,
    String? textStyleType,
    bool? price,
    int? pageMarginRight,
    String? buyBtnType,
    List<ScrollImageSliderSubEntry>? subEntry,
    String? imageStyle,
    int? swipeTime,
    bool? bottomrds,
    int? pageMarginBottom,
    String? soldColor,
    String? sizeType,
    String? titleColor,
    String? priceColor,
    String? borderRadiusType,
    int? pageMarginLeft,
    String? oldpriceColor,
    int? bdr,
    String? bgColor,
    bool? showTitle,
    String? cornerType,
    String? cornerMarkImage,
    String? buttonText,
  }) {
    return ScrollImageSliderEntity()
      ..indicator = indicator ?? this.indicator
      ..pageMarginTop = pageMarginTop ?? this.pageMarginTop
      ..showOriginPrice = showOriginPrice ?? this.showOriginPrice
      ..imageFillStyle = imageFillStyle ?? this.imageFillStyle
      ..maskColor = maskColor ?? this.maskColor
      ..goods = goods ?? this.goods
      ..cornerMarkType = cornerMarkType ?? this.cornerMarkType
      ..textAlignType = textAlignType ?? this.textAlignType
      ..showCornerMark = showCornerMark ?? this.showCornerMark
      ..uuid = uuid ?? this.uuid
      ..textStyleType = textStyleType ?? this.textStyleType
      ..price = price ?? this.price
      ..pageMarginRight = pageMarginRight ?? this.pageMarginRight
      ..buyBtnType = buyBtnType ?? this.buyBtnType
      ..subEntry = subEntry ?? this.subEntry
      ..imageStyle = imageStyle ?? this.imageStyle
      ..swipeTime = swipeTime ?? this.swipeTime
      ..bottomrds = bottomrds ?? this.bottomrds
      ..pageMarginBottom = pageMarginBottom ?? this.pageMarginBottom
      ..soldColor = soldColor ?? this.soldColor
      ..sizeType = sizeType ?? this.sizeType
      ..titleColor = titleColor ?? this.titleColor
      ..priceColor = priceColor ?? this.priceColor
      ..borderRadiusType = borderRadiusType ?? this.borderRadiusType
      ..pageMarginLeft = pageMarginLeft ?? this.pageMarginLeft
      ..oldpriceColor = oldpriceColor ?? this.oldpriceColor
      ..bdr = bdr ?? this.bdr
      ..bgColor = bgColor ?? this.bgColor
      ..showTitle = showTitle ?? this.showTitle
      ..cornerType = cornerType ?? this.cornerType
      ..cornerMarkImage = cornerMarkImage ?? this.cornerMarkImage
      ..buttonText = buttonText ?? this.buttonText;
  }
}

ScrollImageSliderGoods $ScrollImageSliderGoodsFromJson(Map<String, dynamic> json) {
  final ScrollImageSliderGoods scrollImageSliderGoods = ScrollImageSliderGoods();
  final int? isCombination = jsonConvert.convert<int>(json['isCombination']);
  if (isCombination != null) {
    scrollImageSliderGoods.isCombination = isCombination;
  }
  final int? commoditySource = jsonConvert.convert<int>(json['commoditySource']);
  if (commoditySource != null) {
    scrollImageSliderGoods.commoditySource = commoditySource;
  }
  final String? className = jsonConvert.convert<String>(json['className']);
  if (className != null) {
    scrollImageSliderGoods.className = className;
  }
  final double? priceMarket = jsonConvert.convert<double>(json['priceMarket']);
  if (priceMarket != null) {
    scrollImageSliderGoods.priceMarket = priceMarket;
  }
  final int? secondClassID = jsonConvert.convert<int>(json['secondClassID']);
  if (secondClassID != null) {
    scrollImageSliderGoods.secondClassID = secondClassID;
  }
  final int? baseSpec = jsonConvert.convert<int>(json['baseSpec']);
  if (baseSpec != null) {
    scrollImageSliderGoods.baseSpec = baseSpec;
  }
  final int? number = jsonConvert.convert<int>(json['number']);
  if (number != null) {
    scrollImageSliderGoods.number = number;
  }
  final int? classId = jsonConvert.convert<int>(json['classId']);
  if (classId != null) {
    scrollImageSliderGoods.classId = classId;
  }
  final int? commodityStatus = jsonConvert.convert<int>(json['commodityStatus']);
  if (commodityStatus != null) {
    scrollImageSliderGoods.commodityStatus = commodityStatus;
  }
  final double? price = jsonConvert.convert<double>(json['price']);
  if (price != null) {
    scrollImageSliderGoods.price = price;
  }
  final double? highPrice = jsonConvert.convert<double>(json['highPrice']);
  if (highPrice != null) {
    scrollImageSliderGoods.highPrice = highPrice;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    scrollImageSliderGoods.id = id;
  }
  final String? supplierName = jsonConvert.convert<String>(json['supplierName']);
  if (supplierName != null) {
    scrollImageSliderGoods.supplierName = supplierName;
  }
  final String? image = jsonConvert.convert<String>(json['image']);
  if (image != null) {
    scrollImageSliderGoods.image = image;
  }
  final String? brandName = jsonConvert.convert<String>(json['brandName']);
  if (brandName != null) {
    scrollImageSliderGoods.brandName = brandName;
  }
  final dynamic paySingle = json['paySingle'];
  if (paySingle != null) {
    scrollImageSliderGoods.paySingle = paySingle;
  }
  final int? priceType = jsonConvert.convert<int>(json['priceType']);
  if (priceType != null) {
    scrollImageSliderGoods.priceType = priceType;
  }
  final List<ScrollImageSliderGoodsSpecList>? specList = (json['specList'] as List<dynamic>?)?.map((e) => jsonConvert.convert<ScrollImageSliderGoodsSpecList>(e) as ScrollImageSliderGoodsSpecList).toList();
  if (specList != null) {
    scrollImageSliderGoods.specList = specList;
  }
  final int? firstClassID = jsonConvert.convert<int>(json['firstClassID']);
  if (firstClassID != null) {
    scrollImageSliderGoods.firstClassID = firstClassID;
  }
  final String? commodityId = jsonConvert.convert<String>(json['commodityId']);
  if (commodityId != null) {
    scrollImageSliderGoods.commodityId = commodityId;
  }
  final dynamic sort = json['sort'];
  if (sort != null) {
    scrollImageSliderGoods.sort = sort;
  }
  final int? commodityType = jsonConvert.convert<int>(json['commodityType']);
  if (commodityType != null) {
    scrollImageSliderGoods.commodityType = commodityType;
  }
  final String? barCode = jsonConvert.convert<String>(json['barCode']);
  if (barCode != null) {
    scrollImageSliderGoods.barCode = barCode;
  }
  final String? spuSpecJsonBody = jsonConvert.convert<String>(json['spuSpecJsonBody']);
  if (spuSpecJsonBody != null) {
    scrollImageSliderGoods.spuSpecJsonBody = spuSpecJsonBody;
  }
  final double? taxRate = jsonConvert.convert<double>(json['taxRate']);
  if (taxRate != null) {
    scrollImageSliderGoods.taxRate = taxRate;
  }
  final String? mainImage = jsonConvert.convert<String>(json['mainImage']);
  if (mainImage != null) {
    scrollImageSliderGoods.mainImage = mainImage;
  }
  final double? priceCost = jsonConvert.convert<double>(json['priceCost']);
  if (priceCost != null) {
    scrollImageSliderGoods.priceCost = priceCost;
  }
  final List<dynamic>? discountLabel = (json['discountLabel'] as List<dynamic>?)?.map((e) => e).toList();
  if (discountLabel != null) {
    scrollImageSliderGoods.discountLabel = discountLabel;
  }
  final int? commodityForm = jsonConvert.convert<int>(json['commodityForm']);
  if (commodityForm != null) {
    scrollImageSliderGoods.commodityForm = commodityForm;
  }
  final int? brandId = jsonConvert.convert<int>(json['brandId']);
  if (brandId != null) {
    scrollImageSliderGoods.brandId = brandId;
  }
  final double? highTaxRate = jsonConvert.convert<double>(json['highTaxRate']);
  if (highTaxRate != null) {
    scrollImageSliderGoods.highTaxRate = highTaxRate;
  }
  final String? skuCode = jsonConvert.convert<String>(json['skuCode']);
  if (skuCode != null) {
    scrollImageSliderGoods.skuCode = skuCode;
  }
  final String? commodityName = jsonConvert.convert<String>(json['commodityName']);
  if (commodityName != null) {
    scrollImageSliderGoods.commodityName = commodityName;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    scrollImageSliderGoods.status = status;
  }
  return scrollImageSliderGoods;
}

Map<String, dynamic> $ScrollImageSliderGoodsToJson(ScrollImageSliderGoods entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['isCombination'] = entity.isCombination;
  data['commoditySource'] = entity.commoditySource;
  data['className'] = entity.className;
  data['priceMarket'] = entity.priceMarket;
  data['secondClassID'] = entity.secondClassID;
  data['baseSpec'] = entity.baseSpec;
  data['number'] = entity.number;
  data['classId'] = entity.classId;
  data['commodityStatus'] = entity.commodityStatus;
  data['price'] = entity.price;
  data['highPrice'] = entity.highPrice;
  data['id'] = entity.id;
  data['supplierName'] = entity.supplierName;
  data['image'] = entity.image;
  data['brandName'] = entity.brandName;
  data['paySingle'] = entity.paySingle;
  data['priceType'] = entity.priceType;
  data['specList'] = entity.specList?.map((v) => v.toJson()).toList();
  data['firstClassID'] = entity.firstClassID;
  data['commodityId'] = entity.commodityId;
  data['sort'] = entity.sort;
  data['commodityType'] = entity.commodityType;
  data['barCode'] = entity.barCode;
  data['spuSpecJsonBody'] = entity.spuSpecJsonBody;
  data['taxRate'] = entity.taxRate;
  data['mainImage'] = entity.mainImage;
  data['priceCost'] = entity.priceCost;
  data['discountLabel'] = entity.discountLabel;
  data['commodityForm'] = entity.commodityForm;
  data['brandId'] = entity.brandId;
  data['highTaxRate'] = entity.highTaxRate;
  data['skuCode'] = entity.skuCode;
  data['commodityName'] = entity.commodityName;
  data['status'] = entity.status;
  return data;
}

extension ScrollImageSliderGoodsExtension on ScrollImageSliderGoods {
  ScrollImageSliderGoods copyWith({
    int? isCombination,
    int? commoditySource,
    String? className,
    double? priceMarket,
    int? secondClassID,
    int? baseSpec,
    int? number,
    int? classId,
    int? commodityStatus,
    double? price,
    double? highPrice,
    String? id,
    String? supplierName,
    String? image,
    String? brandName,
    dynamic paySingle,
    int? priceType,
    List<ScrollImageSliderGoodsSpecList>? specList,
    int? firstClassID,
    String? commodityId,
    dynamic sort,
    int? commodityType,
    String? barCode,
    String? spuSpecJsonBody,
    double? taxRate,
    String? mainImage,
    double? priceCost,
    List<dynamic>? discountLabel,
    int? commodityForm,
    int? brandId,
    double? highTaxRate,
    String? skuCode,
    String? commodityName,
    int? status,
  }) {
    return ScrollImageSliderGoods()
      ..isCombination = isCombination ?? this.isCombination
      ..commoditySource = commoditySource ?? this.commoditySource
      ..className = className ?? this.className
      ..priceMarket = priceMarket ?? this.priceMarket
      ..secondClassID = secondClassID ?? this.secondClassID
      ..baseSpec = baseSpec ?? this.baseSpec
      ..number = number ?? this.number
      ..classId = classId ?? this.classId
      ..commodityStatus = commodityStatus ?? this.commodityStatus
      ..price = price ?? this.price
      ..highPrice = highPrice ?? this.highPrice
      ..id = id ?? this.id
      ..supplierName = supplierName ?? this.supplierName
      ..image = image ?? this.image
      ..brandName = brandName ?? this.brandName
      ..paySingle = paySingle ?? this.paySingle
      ..priceType = priceType ?? this.priceType
      ..specList = specList ?? this.specList
      ..firstClassID = firstClassID ?? this.firstClassID
      ..commodityId = commodityId ?? this.commodityId
      ..sort = sort ?? this.sort
      ..commodityType = commodityType ?? this.commodityType
      ..barCode = barCode ?? this.barCode
      ..spuSpecJsonBody = spuSpecJsonBody ?? this.spuSpecJsonBody
      ..taxRate = taxRate ?? this.taxRate
      ..mainImage = mainImage ?? this.mainImage
      ..priceCost = priceCost ?? this.priceCost
      ..discountLabel = discountLabel ?? this.discountLabel
      ..commodityForm = commodityForm ?? this.commodityForm
      ..brandId = brandId ?? this.brandId
      ..highTaxRate = highTaxRate ?? this.highTaxRate
      ..skuCode = skuCode ?? this.skuCode
      ..commodityName = commodityName ?? this.commodityName
      ..status = status ?? this.status;
  }
}

ScrollImageSliderGoodsSpecList $ScrollImageSliderGoodsSpecListFromJson(Map<String, dynamic> json) {
  final ScrollImageSliderGoodsSpecList scrollImageSliderGoodsSpecList = ScrollImageSliderGoodsSpecList();
  final dynamic taxRate = json['taxRate'];
  if (taxRate != null) {
    scrollImageSliderGoodsSpecList.taxRate = taxRate;
  }
  final double? priceCost = jsonConvert.convert<double>(json['priceCost']);
  if (priceCost != null) {
    scrollImageSliderGoodsSpecList.priceCost = priceCost;
  }
  final int? specNum = jsonConvert.convert<int>(json['specNum']);
  if (specNum != null) {
    scrollImageSliderGoodsSpecList.specNum = specNum;
  }
  final double? price = jsonConvert.convert<double>(json['price']);
  if (price != null) {
    scrollImageSliderGoodsSpecList.price = price;
  }
  final double? highPrice = jsonConvert.convert<double>(json['highPrice']);
  if (highPrice != null) {
    scrollImageSliderGoodsSpecList.highPrice = highPrice;
  }
  final double? priceMarket = jsonConvert.convert<double>(json['priceMarket']);
  if (priceMarket != null) {
    scrollImageSliderGoodsSpecList.priceMarket = priceMarket;
  }
  final double? profit = jsonConvert.convert<double>(json['profit']);
  if (profit != null) {
    scrollImageSliderGoodsSpecList.profit = profit;
  }
  return scrollImageSliderGoodsSpecList;
}

Map<String, dynamic> $ScrollImageSliderGoodsSpecListToJson(ScrollImageSliderGoodsSpecList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['taxRate'] = entity.taxRate;
  data['priceCost'] = entity.priceCost;
  data['specNum'] = entity.specNum;
  data['price'] = entity.price;
  data['highPrice'] = entity.highPrice;
  data['priceMarket'] = entity.priceMarket;
  data['profit'] = entity.profit;
  return data;
}

extension ScrollImageSliderGoodsSpecListExtension on ScrollImageSliderGoodsSpecList {
  ScrollImageSliderGoodsSpecList copyWith({
    dynamic taxRate,
    double? priceCost,
    int? specNum,
    double? price,
    double? highPrice,
    double? priceMarket,
    double? profit,
  }) {
    return ScrollImageSliderGoodsSpecList()
      ..taxRate = taxRate ?? this.taxRate
      ..priceCost = priceCost ?? this.priceCost
      ..specNum = specNum ?? this.specNum
      ..price = price ?? this.price
      ..highPrice = highPrice ?? this.highPrice
      ..priceMarket = priceMarket ?? this.priceMarket
      ..profit = profit ?? this.profit;
  }
}

ScrollImageSliderSubEntry $ScrollImageSliderSubEntryFromJson(Map<String, dynamic> json) {
  final ScrollImageSliderSubEntry scrollImageSliderSubEntry = ScrollImageSliderSubEntry();
  final String? linkType = jsonConvert.convert<String>(json['link_type']);
  if (linkType != null) {
    scrollImageSliderSubEntry.linkType = linkType;
  }
  final int? imageHeight = jsonConvert.convert<int>(json['image_height']);
  if (imageHeight != null) {
    scrollImageSliderSubEntry.imageHeight = imageHeight;
  }
  final String? imageUrl = jsonConvert.convert<String>(json['image_url']);
  if (imageUrl != null) {
    scrollImageSliderSubEntry.imageUrl = imageUrl;
  }
  final String? linkUrl = jsonConvert.convert<String>(json['link_url']);
  if (linkUrl != null) {
    scrollImageSliderSubEntry.linkUrl = linkUrl;
  }
  final String? linkTitle = jsonConvert.convert<String>(json['link_title']);
  if (linkTitle != null) {
    scrollImageSliderSubEntry.linkTitle = linkTitle;
  }
  final int? imageWidth = jsonConvert.convert<int>(json['image_width']);
  if (imageWidth != null) {
    scrollImageSliderSubEntry.imageWidth = imageWidth;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    scrollImageSliderSubEntry.title = title;
  }
  final String? linkId = jsonConvert.convert<String>(json['link_id']);
  if (linkId != null) {
    scrollImageSliderSubEntry.linkId = linkId;
  }
  return scrollImageSliderSubEntry;
}

Map<String, dynamic> $ScrollImageSliderSubEntryToJson(ScrollImageSliderSubEntry entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['link_type'] = entity.linkType;
  data['image_height'] = entity.imageHeight;
  data['image_url'] = entity.imageUrl;
  data['link_url'] = entity.linkUrl;
  data['link_title'] = entity.linkTitle;
  data['image_width'] = entity.imageWidth;
  data['title'] = entity.title;
  data['link_id'] = entity.linkId;
  return data;
}

extension ScrollImageSliderSubEntryExtension on ScrollImageSliderSubEntry {
  ScrollImageSliderSubEntry copyWith({
    String? linkType,
    int? imageHeight,
    String? imageUrl,
    String? linkUrl,
    String? linkTitle,
    int? imageWidth,
    String? title,
    String? linkId,
  }) {
    return ScrollImageSliderSubEntry()
      ..linkType = linkType ?? this.linkType
      ..imageHeight = imageHeight ?? this.imageHeight
      ..imageUrl = imageUrl ?? this.imageUrl
      ..linkUrl = linkUrl ?? this.linkUrl
      ..linkTitle = linkTitle ?? this.linkTitle
      ..imageWidth = imageWidth ?? this.imageWidth
      ..title = title ?? this.title
      ..linkId = linkId ?? this.linkId;
  }
}
